<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
	<table cellspacing="10px">
	<tr>
		<td></td><td>用户</td><td>留言内容</td><td>联系方式</td><td>状态</td><td>操作</td>
		</tr>
	<?php 
	require_once("../conn/conn_db.php");  //包含数据库连接文件  
  $sql = "select * from  contact order by c_time desc" ; //查询语句
  $result = $conn->query($sql);  //执行SQL语句
  while($row = $result->fetch_array())   //遍历查询结果的每一行
  {
?>
  <tr>
	<td> <?php echo $row["c_time"];?> </td>
    <td> <img src='../../<?php echo $row['u_header'];?>' width="40px" height="40px" style="border-radius: 50%;"  /><br>
		<?php echo $row["u_name"];?>
	  </td>
    <td width="400px" height="auto"> <?php echo $row["contact_info"];?> </td>
    
    <td>
	  邮箱：<?php echo $row["u_email"];?>
		<br>
		电话：<?php echo $row["u_tel"];?>
	  </td>
    
    
    <td>
    <?php switch ($row["status"])
       {
     	case '1':
     		echo '<font color=red>等待查看</font>';
     		break;
     	case '2':
     		echo '<font color=blue>已查看</font>';
     		break;

       }
     ?> 
     </td>
    <td><a href="action/contact_action_do.php?Type=2&ct_id=<?php echo $row["ct_id"];?>">确认查看</a></td>
  </tr>
<?php }   ?>
	
	
	
	
	</table>
	
	
</body>
</html>